﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WFCSharp_II.Questions
{
    public partial class ParentForm : Form
    {
        public ParentForm()
        {
            InitializeComponent();
        }

        private void showChildButton_Click(object sender, EventArgs e)
        {
            ChildForm child = new ChildForm();
            
            child.FormClosed += new FormClosedEventHandler(child_FormClosed);
            showChildButton.Enabled = false;
            child.Show();
        }

        void child_FormClosed(object sender, FormClosedEventArgs e)
        {
            showChildButton.Enabled = true;
        }
    }
}
